<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditClienteTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditClienteLabel_idcliente}" for="idcliente" />
                    <h:inputText id="idcliente" value="#{clienteController.selected.idcliente}" title="#{bundle.EditClienteTitle_idcliente}" required="true" requiredMessage="#{bundle.EditClienteRequiredMessage_idcliente}"/>
                    <h:outputLabel value="#{bundle.EditClienteLabel_razaosocial}" for="razaosocial" />
                    <h:inputText id="razaosocial" value="#{clienteController.selected.razaosocial}" title="#{bundle.EditClienteTitle_razaosocial}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_fantasia}" for="fantasia" />
                    <h:inputText id="fantasia" value="#{clienteController.selected.fantasia}" title="#{bundle.EditClienteTitle_fantasia}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_identificacao}" for="identificacao" />
                    <h:inputText id="identificacao" value="#{clienteController.selected.identificacao}" title="#{bundle.EditClienteTitle_identificacao}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_sexo}" for="sexo" />
                    <h:inputText id="sexo" value="#{clienteController.selected.sexo}" title="#{bundle.EditClienteTitle_sexo}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_inscestadual}" for="inscestadual" />
                    <h:inputText id="inscestadual" value="#{clienteController.selected.inscestadual}" title="#{bundle.EditClienteTitle_inscestadual}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_email}" for="email" />
                    <h:inputText id="email" value="#{clienteController.selected.email}" title="#{bundle.EditClienteTitle_email}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_telefone}" for="telefone" />
                    <h:inputText id="telefone" value="#{clienteController.selected.telefone}" title="#{bundle.EditClienteTitle_telefone}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_celular}" for="celular" />
                    <h:inputText id="celular" value="#{clienteController.selected.celular}" title="#{bundle.EditClienteTitle_celular}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_endereco}" for="endereco" />
                    <h:inputText id="endereco" value="#{clienteController.selected.endereco}" title="#{bundle.EditClienteTitle_endereco}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_bairro}" for="bairro" />
                    <h:inputText id="bairro" value="#{clienteController.selected.bairro}" title="#{bundle.EditClienteTitle_bairro}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_cidade}" for="cidade" />
                    <h:inputText id="cidade" value="#{clienteController.selected.cidade}" title="#{bundle.EditClienteTitle_cidade}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_descricao}" for="descricao" />
                    <h:inputText id="descricao" value="#{clienteController.selected.descricao}" title="#{bundle.EditClienteTitle_descricao}" />
                    <h:outputLabel value="#{bundle.EditClienteLabel_idcontato}" for="idcontato" />
                    <h:inputText id="idcontato" value="#{clienteController.selected.idcontato}" title="#{bundle.EditClienteTitle_idcontato}" required="true" requiredMessage="#{bundle.EditClienteRequiredMessage_idcontato}"/>
                </h:panelGrid>
                <h:commandLink action="#{clienteController.update}" value="#{bundle.EditClienteSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditClienteViewLink}"/>
                <br />
                <h:commandLink action="#{clienteController.prepareList}" value="#{bundle.EditClienteShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditClienteIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
